home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20030409-20031118 / 000399_fdc@columbia.edu_Fri Nov 7 14:23:47 2003.msg < prev    next >
Internet Message Format  |  2020-01-01  |  2KB

  1. Path: newsmaster.cc.columbia.edu!not-for-mail
  2. From: Frank da Cruz <fdc@columbia.edu>
  3. Newsgroups: comp.protocols.kermit.misc
  4. Subject: Re: Problem with Kermit spawned from Expect script sending files
  5. Date: 7 Nov 2003 19:23:20 GMT
  6. Organization: Columbia University
  7. Lines: 22
  8. Message-ID: <slrnbqns98.69r.fdc@sesame.cc.columbia.edu>
  9. References: <f0bb0f39.0311061216.1ba040a0@posting.google.com> <slrnbqlcid.ooo.fdc@sesame.cc.columbia.edu> <f0bb0f39.0311070527.6ce76ffc@posting.google.com> <slrnbqnbfm.380.fdc@sesame.cc.columbia.edu> <f0bb0f39.0311070946.62574f98@posting.google.com>
  10. Reply-To: fdc@columbia.edu
  11. NNTP-Posting-Host: sesame.cc.columbia.edu
  12. X-Trace: newsmaster.cc.columbia.edu 1068233000 1492 128.59.59.56 (7 Nov 2003 19:23:20 GMT)
  13. X-Complaints-To: postmaster@columbia.edu
  14. NNTP-Posting-Date: 7 Nov 2003 19:23:20 GMT
  15. User-Agent: slrn/0.9.7.4 (SunOS)
  16. Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:14654
  17.  
  18. In article <f0bb0f39.0311070946.62574f98@posting.google.com>,
  19. newexpectuser wrote:
  20. : I tried the /pty, but when I run it (via ./scriptname.sh), it puts me
  21. : at a "C-Kermit>" prompt ?
  22. :
  23. Here's a script that works for me:
  24.  
  25.   #!/usr/bin/kermit +
  26.   ;
  27.   ; Using OpenSSH_3.7.1p2...
  28.   ;
  29.   set host /pty ssh -e none -l \v(userid) \%1
  30.   if fail stop 1
  31.   input 20 password:
  32.   if success lineout \%2
  33.  
  34. In this script, \%1 is the hostname or address and \%2 is the password.
  35.  
  36. I suspect your script did not wait for the "password:" prompt and the
  37. ssh client does not allow typeahead.
  38.  
  39. - Frank
  40.